# Maintainer: Donoban <donoban@riseup.net>
pkgname=bubblejail
pkgver=0.9.3
pkgrel=0
pkgdesc="Bubblewrap based sandboxing for desktop applications"
url="https://github.com/igo95862/bubblejail"
arch="noarch"
license="GPL-3.0-or-later"
depends="
	bubblewrap
	libseccomp
	py3-lxns
	py3-tomli-w
	py3-xdg
	xdg-dbus-proxy
	"
makedepends="
	meson
	scdoc
	py3-jinja2
	"
subpackages="
	$pkgname-doc
	$pkgname-pyc
	$pkgname-bash-completion
	$pkgname-fish-completion
	$pkgname-config
	"
source="bubblejail-$pkgver.tar.gz::https://github.com/igo95862/bubblejail/archive/refs/tags/$pkgver.tar.gz
				site-packages.patch"
options="!check" # No tests

build() {
	abuild-meson \
		-Dversion_display="Alpine $pkgver" \
		. output
	meson compile -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

config() {
	depends="$pkgname=$pkgver-r$pkgrel py3-qt6"
	amove /usr/bin/bubblejail-config
	amove /usr/lib/python3.*/site-packages/bubblejail/bubblejail_gui_qt.py
}

sha512sums="
9be3ad29116c9a992dea40b40fa73d14b0021ef19dbec9b3588c9c11b24406f42dca15c125a983df377615a31baca4e5fe45c291c7111f61ae30ddb66fe03183  bubblejail-0.9.3.tar.gz
5eb891d23fd4ef3758be542c529c6f252fafe311fa51fd54aed6b080a5c622c72357a05ba5eb37353ce13fdbbad4958e5750cb19e48b17e28982722bfd5519fc  site-packages.patch
"
